<!DOCTYPE html>
<html lang="zh-CN">
 <head> 
<#include "../head.html" />
<#import "../layout/page.html" as allBase>
 </head> 
 <body>
<#include "../layout/top.html" />
<div class="container bs-docs-container"> 
  <div class="row">
	<#include "../layout/left-menu.html" />
	<div class="col-md-9" role="main">
		<div class="alert alert-info" id="tb_num">
		当前已列出 ${page.totalRow} 个贴吧。已签到 ${signCount} 个贴吧，还有  ${unSignCount} 个贴吧等待签到<br>
		功能：<a href="${base}/baidu/signMyTb" onclick="$('#tb_num').html('正在进行贴吧签到，可能需要较长时间，请耐心等待...')">一键签到</a> | 
		<a href="${base}/baidu/getMyTb" onclick="$('#tb_num').html('正在刷新贴吧列表，可能需要较长时间，请耐心等待...')">刷新贴吧列表</a> | 
		<a href="${base}/baidu/clearMyTb" onclick="return confirm('你真的要清空所有贴吧吗？');">清空列表</a> | 
		<a href="javascript:$('#ignoreForm').submit();">忽略签到</a>
		</div>
		<form id="optionConditionForm" action="${base}/baidu/myTb" method="post">
			<input id="pageNumber" type="hidden" name="pageNumber" value="${page.pageNumber}" />
			<select name="bdUser" onchange="$('#optionConditionForm').submit();">
				<option value="">全部</option>
				<#list bds as bd>
					<option value="${bd.guid}" <#if bd.guid==bdUserGuid>selected="selected"</#if>>${bd.nickName}</option>
				</#list>
			</select>
		</form>	
			<div class="table-responsive">
			<form id="ignoreForm" action="${base}/baidu/ignoreSign" method="post">
				<table class="table table-hover">
					<thead>
						<tr>
							<th>序号</th>
							<th>百度账号</th>
							<th>贴吧名称</th>
							<th>等级</th>
							<th>经验</th>
							<th width="22%">签到状态</th>
							<th>连续签到</th>
							<th>上一次签到</th>
							<th>忽略签到</th>
						</tr>
					</thead>
					<tbody>
					<#assign x=(page.pageNumber-1)*page.pageSize+1>
					<#list page.list as bean>
						<tr>
						<td>
							${x}
							<input type="hidden" name="ob${bean_index}.guid" value="${bean.guid}" />
						</td>
						<td>${bean.nickName}</td>
						<td class="wrap"><a title="${bean.name}" href="${bean.href}" target="_blank">${bean.name}</a></td>
						<td>${bean.level} 级</td>
						<td>${bean.ex}</td>
						<td>
						<#if bean.code??>
							<#if bean.code=='0'>
								<span class="label label-success">签到成功</span>
							<#elseif bean.code=='160002'>
								<span class="label label-info">${bean.error_msg}</span>
							<#elseif bean.code=='340006'>
								<span class="label label-danger">${bean.error_msg}</span>
							<#elseif bean.code=='1'>
								<span class="label label-danger">${bean.error_msg},可能是cookie失效</span>
							<#elseif bean.code=='2280007'>
								<span class="label label-danger">${bean.error_msg}</span>
							<#elseif bean.code=='340011'>
								<span class="label label-warning">${bean.error_msg}</span>
							</#if>
						<#else>
							<span class="label label-default">待签到</span>
						</#if>
						</td>
						<td>${(bean.countSignNum)!'--'}天</td>
						<td>${bean.signTime!''}</td>
						<td>
						<#if bean.isHuLue >
						 <input type="radio" name="ob${bean_index}.isHuLue" value="1" checked="checked"> 是 <input type="radio" name="ob${bean_index}.isHuLue" value="0"> 否
						<#else>
						 <input type="radio" name="ob${bean_index}.isHuLue" value="1"> 是 <input type="radio" name="ob${bean_index}.isHuLue" value="0" checked="checked"> 否
						</#if>
						</td>
						</tr>
						<#assign x=x+1>
					</#list>
					</tbody>
				</table>
				</form>
			</div>
			<@allBase.pagination/>
	</div>
  </div>
 </div>
 <script type="text/javascript">
 function pagination(pageNumber) {
	$("#pageNumber").val(pageNumber);
	$("#optionConditionForm").submit();
 }
 </script>
 </body>
</html>